import Roact, { Element } from "@rbxts/roact";

export default class Mouter {
    tree: Roact.Tree | undefined

    unMount() {
        if (!this.tree) return
        Roact.unmount(this.tree);
        this.tree = undefined
    }
    mount(element: Element, parent?: Instance) {
        this.tree = Roact.mount(element, parent)
        return element
    }
}